<div class="modal fade bs-modal-lg" id="modelContent">
	<div class="modal-dialog modal-lg">
        <div class="modal-content"></div>
    </div>
</div> 
<div class="portlet box green">
    <div class="portlet-title">
		<div class="caption"><i class="fa fa-cogs"></i>基本设置 > 地区管理 > 地区列表</div>
    </div>
    <div class="portlet-body">
    	<div class="dataTables_wrapper no-footer">
			<div class="table-container table-scrollable">
			    <table class="table table-striped table-bordered table-hover" id="tableCategory">
				  	<thead>
						<tr>
		   		 			<th>地区名称</th>
		   		 			<th>地区缩写</th>
		   		 			<th>英文名称</th>
							<th class="col-md-2">操作</th>
						</tr>
					</thead>
					<tbody>
					#foreach($item in $citys)
		  				<tr data-tt-id="$!item.cityCode" data-tt-parent-id="$!item.parentId" id="$!item.cityCode">  
		  					<td>$!item.name</td>
						    <td>$!item.first</td>
						    <td>$!item.spelling</td>
			    			<td nowrap="nowrap">
			    				#if($!item.type != 1)
			    				<a class="btn green btn-outline btn-sm ajax-model-get" data-toggle="modal"
			    				 href="#modelContent" thref="/city/edit?id=$!item.id"> 
									<i class="fa fa-edit"></i>修改
								</a>
								#end
			    		     	#if($!item.type == 1 || $!item.type == 2 || $!item.type == 3)
								<a  href="/city/add?id=$!item.id" class="btn green btn-outline btn-sm ajaxify" >
								<i class="fa fa-plus"></i>新增子城市</a>
	    						#end
	    						#if($!item.type != 1)
								<a class="btn green btn-outline btn-sm ajax-delete" 
									href="javascript:;" thref="/city/delete?id=$!item.id">
									<i class="fa fa-trash"></i>删除
								</a>
								#end
						    </td>		  			
		  				</tr>
					#end
					</tbody>
				</table>
			</div>
		</div>
    </div>
</div>
<script type="text/javascript">
  $(function(){
	  $("#tableCategory").treetable({
			expandable : true,
			onInitialized : function(){
				 
			},
			onNodeExpand: function(){
				 
			},
		});
		$("input[name=name]").focus();
  })
</script>

